home *** CD-ROM | disk | FTP | other *** search
- /* AGA Picture
- ** -----------
- ** Fades in a 32 colour AGA picture (24 bit colour). And then fades it out.
- **
- ** Press left mouse button to exit.
- */
-
- MODULE 'games','games/games'
-
- PROC main()
- DEF screen:PTR TO gamescreen, palette:PTR TO LONG, fadestate:LONG,
- loadpic:PTR TO picture
-
- palette := [ $000000,$080808,$101010,$191919,
- $212121,$292929,$313131,$3A3A3A,
- $424242,$4A4A4A,$525252,$5A5A5A,
- $636363,$6B6B6B,$737373,$7B7B7B,
- $848484,$8C8C8C,$949494,$9C9C9C,
- $A5A5A5,$ADADAD,$B5B5B5,$BDBDBD,
- $C5C5C5,$CECECE,$D6D6D6,$7F7F7F,
- $9B9B9B,$707070,$444444,$1E1E1E
- ]:LONG;
-
- screen := [ GSV1,0,
- 0,0,0, -> Screen_Mem1/2/3
- 0, -> Screen link.
- 0, -> Address of palette.
- 0, -> Address of rasterlist.
- 32, -> Amt of colours in palette.
- 320,256,320,256, -> Screen & Pic Height/Width
- 5, -> Amt of planes.
- 0,0, -> Top of screen offsets, X/Y
- 0,0, -> X/Y counters (for scrolling).
- 0, -> Special attributes.
- LORES OR COL24BIT, -> Screen mode.
- INTERLEAVED, -> Screen type
- 0 -> Reserved area.
- ]:gamescreen;
-
- loadpic := [ PCV1,0, -> Version header.
- 0, -> Destination.
- 320,256, -> Width, Height.
- 5, -> Amount of Planes.
- 32, -> Amount of colours.
- palette, -> Palette (remap).
- LORES OR COL24BIT, -> Screen mode.
- INTERLEAVED, -> Destination.
- 0 -> Parameters.
- ]:picture;
-
- IF gmsbase := OpenLibrary('games.library',0)
- SetUserPri()
- IF (Add_Screen(screen) = ERR_OK)
- loadpic.data := screen.memptr1;
- IF (LoadPic('GAMESLIB:data/IFF.Loading',loadpic) = ERR_OK)
- Show_Screen(screen)
-
- fadestate := 0
- REPEAT
- Wait_OSVBL()
- fadestate := Col24_FadeToPalette(screen,fadestate,palette,1)
- UNTIL (fadestate = 0)
-
- Wait_LMB()
-
- fadestate := 0
- REPEAT
- Wait_OSVBL()
- fadestate := Col24_FadeToBlack(screen,fadestate,2)
- UNTIL (fadestate = 0)
-
- ENDIF
- Delete_Screen(screen)
- ENDIF
- CloseLibrary(gmsbase)
- ENDIF
- ENDPROC
-